#include "SceneGame.h"
#include "GameRoot.h"
#include "UI/GameLayer.h"
#include "common/common.h"

SceneGame::SceneGame(void)
{
	CCLog(" in SceneGame()");
	CCScene::init();
	CCSize size = CCDirector::sharedDirector()->getWinSize();
	CCSprite *pBackgrond = CCSprite::spriteWithSpriteFrameName("bg_game.png");
	pBackgrond->setPosition(ccp(size.width/2, size.height/2));
	float fScale = max(size.height/pBackgrond->getContentSize().height,
		size.width/pBackgrond->getContentSize().width);
	pBackgrond->setScale(fScale);
	this->addChild(pBackgrond);

	m_pGameLayer =new GameLayer();
	this->addChild(m_pGameLayer);

}




SceneGame::~SceneGame()
{

}

GameLayer* SceneGame::getGameLayer()
{
	return m_pGameLayer;
}

